﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="overview.aspx.cs" Inherits="BlackHole.Overview" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <div>
        网点：<asp:DropDownList ID="comboDistricts" runat="server" 
                AutoPostBack="True" 
                onselectedindexchanged="comboDistricts_SelectedIndexChanged">
        </asp:DropDownList>
        <asp:DropDownList ID="comboOwners" runat="server" AutoPostBack="True">
        </asp:DropDownList>
        </div>
        <div>
        设备状态：<asp:DropDownList ID="comboDevices" 
                runat="server" AutoPostBack="True" 
                onselectedindexchanged="comboDevices_SelectedIndexChanged">
        </asp:DropDownList>
        <asp:DropDownList ID="comboFaults" runat="server" AutoPostBack="True">
        </asp:DropDownList>
        </div>
        <div>
        <div><asp:Calendar ID="caleStart" runat="server" SelectedDate="2011-01-01"></asp:Calendar></div>
        <div><asp:Calendar ID="caleEnd" runat="server" SelectedDate="2011-12-31"></asp:Calendar></div>
        
        
        </div>
        
        <div>
            <asp:Button ID="btnExport" runat="server" onclick="btnExport_Click" 
                Text="生成报表" />
            <asp:Button ID="btnExportProductDetails" runat="server" 
                onclick="btnExportProductDetails_Click" Text="导出产品信息" />
            <asp:Button ID="btnExportProductRecords" runat="server" 
                onclick="btnExportProductRecords_Click" Text="导出维修记录" />
        </div>
        <div>
            <asp:GridView ID="dataRecords" runat="server" CellPadding="4" ForeColor="#333333" 
            GridLines="None" DataSourceID="sourceGetRepairRecords" 
                AutoGenerateColumns="False">
            <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
            <Columns>
                <asp:BoundField DataField="Id" HeaderText="Id" SortExpression="Id" 
                    Visible="False" />
                <asp:BoundField DataField="DistrictName" HeaderText="区县" 
                    SortExpression="DistrictName" />
                <asp:BoundField DataField="OwnerName" HeaderText="网点" 
                    SortExpression="OwnerName" />
                <asp:BoundField DataField="ProductStatus" HeaderText="状态" 
                    SortExpression="ProductStatus" />
                <asp:BoundField DataField="ProductSerialNO" HeaderText="序列号" 
                    SortExpression="ProductSerialNO" />
                <asp:BoundField DataField="ProductPsamNO" HeaderText="PSAM卡号" 
                    SortExpression="ProductPsamNO" />
                <asp:BoundField DataField="ProductRomVersion" HeaderText="固件版本" 
                    SortExpression="ProductRomVersion" />
                <asp:BoundField DataField="ProductDeviceName" HeaderText="设备类型" 
                    SortExpression="ProductDeviceName" />
                <asp:BoundField DataField="RequestFaultName" HeaderText="登记故障" 
                    SortExpression="RequestFaultName" />
                <asp:BoundField DataField="RealFaultName" HeaderText="实际故障" 
                    SortExpression="RealFaultName" />
                <asp:BoundField DataField="InDate" HeaderText="登记日期" SortExpression="InDate" />
                <asp:BoundField DataField="OutDate" HeaderText="出库时间" 
                    SortExpression="OutDate" />
                <asp:BoundField DataField="RepairMethod" HeaderText="维修方法" 
                    SortExpression="RepairMethod" />
                <asp:BoundField DataField="RepairGear" HeaderText="维修备件" 
                    SortExpression="RepairGear" />
            </Columns>
            <EditRowStyle BackColor="#999999" />
            <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
            <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
            <SortedAscendingCellStyle BackColor="#E9E7E2" />
            <SortedAscendingHeaderStyle BackColor="#506C8C" />
            <SortedDescendingCellStyle BackColor="#FFFDF8" />
            <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
        </asp:GridView>     
     
   
            <asp:ObjectDataSource ID="sourceGetRepairRecords" runat="server"
                SelectMethod="GetRepairRecords"
                TypeName="BlackHole.DAO.Utility">
                <SelectParameters>
                    <asp:ControlParameter ControlID="comboFaults" DefaultValue="0" 
                        Name="realFaultId" PropertyName="SelectedValue" Type="Int32" />
                    <asp:ControlParameter ControlID="comboDistricts" DefaultValue="0" 
                        Name="districtId" PropertyName="SelectedValue" Type="Int32" />
                    <asp:ControlParameter ControlID="comboOwners" DefaultValue="0" Name="ownerId" 
                        PropertyName="SelectedValue" Type="Int32" />
                    <asp:ControlParameter ControlID="comboDevices" DefaultValue="0" Name="deviceId" 
                        PropertyName="SelectedValue" Type="Int32" />
                    <asp:ControlParameter ControlID="caleStart" DefaultValue="" Name="inDateStart" 
                        PropertyName="SelectedDate" Type="String" />
                    <asp:ControlParameter ControlID="caleEnd" Name="outDateEnd" 
                        PropertyName="SelectedDate" Type="String" />
                </SelectParameters>
            </asp:ObjectDataSource>
        </div>

    
    </div>
    </form>
</body>
</html>
